USE [influenza]
GO

/****** Object:  StoredProcedure [dbo].[SP_diasEnTransito]    Script Date: 02/18/2010 09:23:32 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

-- =============================================
-- Author:		<Author,,Name>
-- Create date: <Create Date,,>
-- Description:	<Description,,>
-- =============================================
CREATE PROCEDURE [dbo].[SP_diasEnTransito] 
AS
BEGIN
	--SET NOCOUNT ON added to prevent extra result sets from
	-- interfering with SELECT statements.
	SET NOCOUNT ON;

    -- Insert statements for procedure here
	update dat_laboratorio set nStatus=2, nRechazo=3 where 
nStatus=0 
and nTecnica is null and nResultado is null
and DATEDIFF(DAY,fmuestra,GETDATE())>=9

END

GO

